package com.jw.springcloud.service;

import com.jw.springcloud.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @Author jiangwang
 * @Created 2020/7/26 0:55
 * @Descprition:
 */
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT")
public interface DeptClientService {

    @GetMapping("/queryById/{id}")
    Dept queryById(@PathVariable("id") long id);

    @GetMapping("/queryAll")
    List<Dept> queryAll();

    @PostMapping("/addDept")
    boolean addDept(Dept dept);
}
